<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>404 - 页面未找到 | 多功能工具箱</title>
    <style>
        :root {
            --primary: #4361ee;
            --primary-hover: #3a56d4;
            --text: #333;
            --text-light: #666;
            --bg: #f8f9fa;
            --bg-card: #ffffff;
            --border: #dee2e6;
            --shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
            --font: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
            --radius: 12px;
        }

        [data-theme="dark"] {
            --text: #e9ecef;
            --text-light: #adb5bd;
            --bg: #1a1a2e;
            --bg-card: #16213e;
            --border: #2c3e50;
            --shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        body {
            font-family: var(--font);
            background-color: var(--bg);
            color: var(--text);
            line-height: 1.6;
            transition: background-color 0.3s ease;
            min-height: 100vh;
            padding-bottom: 2rem;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            text-align: center;
        }

        header {
            background: var(--primary);
            color: white;
            padding: 1.5rem 2rem;
            text-align: center;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
            width: 100%;
            position: fixed;
            top: 0;
            left: 0;
            z-index: 100;
        }

        header h1 {
            margin: 0;
            font-size: 1.8rem;
            font-weight: 600;
        }

        .theme-toggle {
            position: absolute;
            top: 1rem;
            right: 1rem;
            background: rgba(255, 255, 255, 0.2);
            border: none;
            color: white;
            padding: 8px 12px;
            border-radius: 20px;
            cursor: pointer;
            font-size: 0.9rem;
            transition: background 0.3s ease;
        }

        .theme-toggle:hover {
            background: rgba(255, 255, 255, 0.3);
        }

        .container {
            max-width: 800px;
            margin: 80px auto 2rem;
            padding: 0 1rem;
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
        }

        .error-content {
            background: var(--bg-card);
            border-radius: var(--radius);
            box-shadow: var(--shadow);
            padding: 3rem 2rem;
            margin: 2rem 0;
            width: 100%;
            max-width: 600px;
        }

        .error-code {
            font-size: 5rem;
            font-weight: 700;
            color: var(--primary);
            margin-bottom: 1rem;
            text-shadow: 0 2px 4px rgba(67, 97, 238, 0.2);
        }

        .error-title {
            font-size: 1.8rem;
            margin-bottom: 1rem;
            color: var(--text);
        }

        .error-message {
            color: var(--text-light);
            margin-bottom: 2rem;
            font-size: 1.1rem;
        }

        .tools-suggestion {
            margin-top: 2rem;
            padding-top: 2rem;
            border-top: 1px solid var(--border);
        }

        .tools-suggestion h3 {
            color: var(--primary);
            margin-bottom: 1rem;
            font-size: 1.2rem;
        }

        .suggestion-links {
            display: flex;
            flex-wrap: wrap;
            gap: 0.8rem;
            justify-content: center;
        }

        .suggestion-link {
            padding: 8px 16px;
            background-color: var(--primary);
            color: white;
            text-decoration: none;
            border-radius: 6px;
            font-size: 0.9rem;
            transition: background-color 0.3s ease;
        }

        .suggestion-link:hover {
            background-color: var(--primary-hover);
        }

        .back-home {
            display: inline-block;
            margin-top: 1.5rem;
            padding: 10px 20px;
            background-color: #5ea351;
            color: white;
            text-decoration: none;
            border-radius: 6px;
            font-weight: 500;
            transition: background-color 0.3s ease;
        }

        .back-home:hover {
            background-color: #4a8a42;
        }

        .footer {
            text-align: center;
            margin-top: 2rem;
            color: var(--text-light);
            font-size: 0.9rem;
            width: 100%;
        }

        @media (max-width: 768px) {
            .error-code {
                font-size: 3.5rem;
            }
            
            .error-title {
                font-size: 1.5rem;
            }
            
            header {
                padding: 1.2rem;
            }
            
            header h1 {
                font-size: 1.5rem;
            }
            
            .theme-toggle {
                top: 0.8rem;
                right: 0.8rem;
                padding: 6px 10px;
            }
            
            .container {
                margin-top: 70px;
            }
        }
    </style>
</head>
<body>

    <button class="theme-toggle" onclick="toggleTheme()">
        🌙 深色模式
    </button>

    <header>
        <h1>🛠️ 多功能工具箱</h1>
    </header>

    <div class="container">
        <div class="error-content">
            <div class="error-code">404</div>
            <h2 class="error-title">页面未找到</h2>
            <p class="error-message">抱歉，您访问的页面不存在。可能是因为链接错误或页面已被移除。</p>
            
            <a href="https://v2.page.gd/tool/tool.html" class="back-home">返回首页</a>
            
            <div class="tools-suggestion">
                <h3>热门工具推荐</h3>
                <div class="suggestion-links">
                    <a href="https://v2.page.gd/tool/json.html" class="suggestion-link">JSON 格式化</a>
                    <a href="https://v2.page.gd/tool/base64.html" class="suggestion-link">Base64 编解码</a>
                    <a href="https://v2.page.gd/tool/timestamp-convert.html" class="suggestion-link">时间戳转换</a>
                    <a href="https://v2.page.gd/tool/url-encode-decode.html" class="suggestion-link">URL 编解码</a>
                </div>
            </div>
        </div>
    </div>

    <div class="footer">
        <p>© 2025 高效工具集 | 所有工具均在本地运行，保障您的数据安全</p>
    </div>

    <script>
        // 主题切换功能
        function toggleTheme() {
            const currentTheme = document.documentElement.getAttribute('data-theme');
            const newTheme = currentTheme === 'dark' ? 'light' : 'dark';
            document.documentElement.setAttribute('data-theme', newTheme);
            localStorage.setItem('theme', newTheme);
            updateToggleText(newTheme);
        }

        function updateToggleText(theme) {
            const toggleBtn = document.querySelector('.theme-toggle');
            toggleBtn.innerHTML = theme === 'dark' ? '☀️ 浅色模式' : '🌙 深色模式';
        }

        // 初始化主题
        function initTheme() {
            const savedTheme = localStorage.getItem('theme') || 'light';
            document.documentElement.setAttribute('data-theme', savedTheme);
            updateToggleText(savedTheme);
        }

        // 页面加载时初始化主题
        document.addEventListener('DOMContentLoaded', initTheme);
    </script>
</body>
</html>